package com.shiwenping.reply.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.shiwenping.reply.fragment.BaseFragment;

import java.util.List;

/**
 * @author shiwenping
 * @date 17-11-6 下午5:36
 */

public class MainFragmentAdapter extends FragmentPagerAdapter {
    private List<BaseFragment> list;

    public MainFragmentAdapter(FragmentManager fm, List<BaseFragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
